package mygameclient;

import java.awt.Component;
import javax.swing.JOptionPane;

public class MessageBox {

    public static int yesno(String theMessage){
        int result = JOptionPane.showConfirmDialog((Component)
                null, theMessage, "alert", JOptionPane.YES_NO_OPTION);
        return result;
    }

    public static int yesnocancel(String theMessage){
        int result = JOptionPane.showConfirmDialog((Component)
                null, theMessage, "alert", JOptionPane.YES_NO_CANCEL_OPTION);
        return result;
    }

    public static int okcancel(String theMessage){
        int result = JOptionPane.showConfirmDialog((Component)
                null, theMessage, "alert", JOptionPane.OK_CANCEL_OPTION);
        return result;
    }

    public static int ok(String theMessage){
        int result = JOptionPane.showConfirmDialog((Component)
                null, theMessage, "alert", JOptionPane.DEFAULT_OPTION);
        return result;
    }

  /*  public static void main(String args[]){
        int i = mygameclient.MessageBox.yesno("Are your sure ?");
        System.out.println("ret : " + i );
        i = mygameclient.MessageBox.yesnocancel("Are your sure ?");
        System.out.println("ret : " + i );
        i = mygameclient.MessageBox.okcancel("Are your sure ?");
        System.out.println("ret : " + i );
        i = mygameclient.MessageBox.ok("Done.");
        System.out.println("ret : " + i );
    }                       */
}